/* 欢迎页面样式 */

/* 加载屏幕 */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff6b9d, #4ecdc4, #ffe66d);
    background-size: 400% 400%;
    animation: gradientShift 3s ease infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.loading-content {
    text-align: center;
    color: white;
}

.birthday-cake-loading {
    position: relative;
    width: 100px;
    height: 120px;
    margin: 0 auto 30px;
    animation: bounce 2s infinite;
}

.cake-base {
    width: 80px;
    height: 40px;
    background: #8B4513;
    border-radius: 10px;
    position: absolute;
    bottom: 0;
    left: 10px;
}

.cake-layer {
    width: 60px;
    height: 30px;
    background: #FFB6C1;
    border-radius: 8px;
    position: absolute;
    bottom: 35px;
    left: 20px;
}

.candle {
    width: 4px;
    height: 20px;
    background: #FFFF00;
    position: absolute;
    top: 20px;
    left: 48px;
}

.flame {
    width: 8px;
    height: 12px;
    background: radial-gradient(circle, #FF4500, #FFD700);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    position: absolute;
    top: 8px;
    left: 46px;
    animation: flicker 0.5s infinite alternate;
}

@keyframes flicker {
    0% { transform: scale(1) rotate(-2deg); }
    100% { transform: scale(1.1) rotate(2deg); }
}

.loading-text {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.loading-bar {
    width: 200px;
    height: 6px;
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
    margin: 0 auto;
    overflow: hidden;
}

.loading-progress {
    width: 0%;
    height: 100%;
    background: white;
    border-radius: 3px;
    animation: loadingProgress 3s ease-in-out forwards;
}

@keyframes loadingProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* 主内容 */
.welcome-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    z-index: 2;
}

/* 倒计时区域 */
.countdown-section {
    text-align: center;
    margin-bottom: 50px;
    animation: slideInDown 1s ease-out 0.5s both;
}

.countdown-title {
    font-size: 24px;
    color: #ff6b9d;
    margin-bottom: 20px;
    font-weight: 600;
}

.countdown-display {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.countdown-item {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    min-width: 80px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    animation: pulse 2s infinite;
}

.countdown-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: #ff6b9d;
    font-family: 'Fredoka One', cursive;
}

.countdown-label {
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

/* 主标题区域 */
.hero-section {
    text-align: center;
    position: relative;
}

.birthday-crown {
    font-size: 80px;
    animation: bounce 2s infinite;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
}

.main-title {
    font-family: 'Fredoka One', cursive;
    font-size: 4em;
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.title-word {
    display: inline-block;
    background: linear-gradient(45deg, #ff6b9d, #4ecdc4, #ffe66d);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite, titleBounce 0.8s ease-out both;
    filter: drop-shadow(0 0 10px rgba(255, 107, 157, 0.5));
}

.title-word:nth-child(1) { animation-delay: 0.1s; }
.title-word:nth-child(2) { animation-delay: 0.2s; }
.title-word:nth-child(3) { animation-delay: 0.3s; }
.title-word:nth-child(4) { animation-delay: 0.4s; }
.title-word:nth-child(5) { animation-delay: 0.5s; }
.title-word:nth-child(6) { animation-delay: 0.6s; }
.title-word:nth-child(7) { animation-delay: 0.7s; }
.title-word:nth-child(8) { animation-delay: 0.8s; }
.title-word:nth-child(9) { animation-delay: 0.9s; }
.title-word:nth-child(10) { animation-delay: 1.0s; }
.title-word:nth-child(11) { animation-delay: 1.1s; }

@keyframes titleBounce {
    0% { 
        opacity: 0; 
        transform: translateY(-100px) rotate(180deg) scale(0); 
    }
    50% { 
        transform: translateY(-20px) rotate(0deg) scale(1.2); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0) rotate(0deg) scale(1); 
    }
}

/* 生日蛋糕 */
.birthday-cake-container {
    margin: 40px 0;
    perspective: 1000px;
}

.birthday-cake {
    position: relative;
    width: 200px;
    height: 250px;
    margin: 0 auto;
    cursor: pointer;
    transition: all 0.3s ease;
    transform-style: preserve-3d;
}

.birthday-cake:hover {
    transform: scale(1.1) rotateY(10deg);
}

.cake-bottom {
    width: 180px;
    height: 80px;
    background: linear-gradient(45deg, #8B4513, #A0522D);
    border-radius: 20px;
    position: absolute;
    bottom: 0;
    left: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: cakeFloat 3s ease-in-out infinite;
}

.cake-middle {
    width: 140px;
    height: 60px;
    background: linear-gradient(45deg, #FFB6C1, #FF69B4);
    border-radius: 15px;
    position: absolute;
    bottom: 70px;
    left: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    animation: cakeFloat 3s ease-in-out infinite 0.5s;
}

.cake-top {
    width: 100px;
    height: 40px;
    background: linear-gradient(45deg, #FFF8DC, #FFFACD);
    border-radius: 10px;
    position: absolute;
    bottom: 120px;
    left: 50px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    animation: cakeFloat 3s ease-in-out infinite 1s;
}

.candle {
    width: 8px;
    height: 40px;
    background: linear-gradient(to bottom, #FFFF00, #FFD700);
    position: absolute;
    bottom: 160px;
    left: 96px;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.flame {
    width: 16px;
    height: 20px;
    background: radial-gradient(circle, #FF4500, #FFD700, #FF6347);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    position: absolute;
    bottom: 200px;
    left: 92px;
    animation: flicker 0.5s infinite alternate;
    filter: drop-shadow(0 0 10px #FF4500);
}

.cake-decoration {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.cake-decoration::before,
.cake-decoration::after {
    content: '🌟';
    position: absolute;
    font-size: 20px;
    animation: sparkle 2s infinite;
}

.cake-decoration::before {
    top: 20px;
    left: 20px;
    animation-delay: 0s;
}

.cake-decoration::after {
    top: 30px;
    right: 20px;
    animation-delay: 1s;
}

@keyframes cakeFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes sparkle {
    0%, 100% { 
        opacity: 0.3; 
        transform: scale(0.8) rotate(0deg); 
    }
    50% { 
        opacity: 1; 
        transform: scale(1.2) rotate(180deg); 
    }
}

.subtitle {
    font-size: 20px;
    color: #666;
    margin-top: 30px;
    animation: pulse 2s infinite;
    font-weight: 600;
}

/* 导航菜单 */
.navigation-menu {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 50px;
    flex-wrap: wrap;
    animation: slideInUp 1s ease-out 2s both;
}

.nav-item {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: linear-gradient(45deg, #ff6b9d, #4ecdc4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    z-index: -1;
}

.nav-item:hover::before {
    width: 200px;
    height: 200px;
}

.nav-item:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    color: white;
}

.nav-item:hover .nav-text {
    color: white;
}

.nav-icon {
    font-size: 40px;
    margin-bottom: 10px;
    animation: bounce 2s infinite;
}

.nav-text {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    transition: color 0.3s ease;
}

.nav-item.special {
    background: linear-gradient(45deg, #ff6b9d, #4ecdc4);
    color: white;
    animation: glow 2s infinite;
}

.nav-item.special .nav-text {
    color: white;
}

.nav-item.special:hover {
    background: linear-gradient(45deg, #4ecdc4, #ffe66d);
}

/* 烟花和彩带容器 */
#fireworks-container,
#confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5em;
    }
    
    .countdown-display {
        gap: 10px;
    }
    
    .countdown-item {
        padding: 15px;
        min-width: 60px;
    }
    
    .countdown-number {
        font-size: 24px;
    }
    
    .birthday-crown {
        font-size: 60px;
    }
    
    .birthday-cake {
        width: 150px;
        height: 200px;
    }
    
    .cake-bottom {
        width: 135px;
        height: 60px;
    }
    
    .cake-middle {
        width: 105px;
        height: 45px;
        bottom: 55px;
        left: 22px;
    }
    
    .cake-top {
        width: 75px;
        height: 30px;
        bottom: 95px;
        left: 37px;
    }
    
    .navigation-menu {
        gap: 15px;
    }
    
    .nav-item {
        padding: 20px;
        min-width: 100px;
    }
    
    .nav-icon {
        font-size: 30px;
    }
    
    .nav-text {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2em;
    }
    
    .countdown-title {
        font-size: 18px;
    }
    
    .countdown-number {
        font-size: 20px;
    }
    
    .birthday-crown {
        font-size: 50px;
    }
    
    .subtitle {
        font-size: 16px;
    }
    
    .navigation-menu {
        gap: 10px;
    }
    
    .nav-item {
        padding: 15px;
        min-width: 80px;
    }
    
    .nav-icon {
        font-size: 25px;
    }
    
    .nav-text {
        font-size: 12px;
    }
}

